package org.example;


import javax.swing.*;
import java.awt.*;

public class MainP extends JPanel {
    private JPanel contentP;
    private JLabel onePanel;
    private JLabel twoPanel;
    private JLabel threePanel;

    public MainP() {
        this.addContent();
    }

    private void addContent() {
        this.setLayout(new CardLayout());
        ImageIcon icon1 = new ImageIcon("/Users/cengyunke/Desktop/atm1/Photo/src/main/java/org/example/img/pexels-aleksandar-pasaric-9793432.jpg");
        this.onePanel = new JLabel();
        this.onePanel.setIcon(icon1);

        ImageIcon icon2 = new ImageIcon("/Users/cengyunke/Desktop/atm1/Photo/src/main/java/org/example/img/pexels-aleksandar-pasaric-9793670.jpg");
        this.twoPanel = new JLabel();
        this.twoPanel.setIcon(icon2);

        ImageIcon icon3 = new ImageIcon("/Users/cengyunke/Desktop/atm1/Photo/src/main/java/org/example/img/pexels-jimmy-teoh-1010657.jpg");
        this.threePanel = new JLabel();
        this.threePanel.setIcon(icon3);


        this.add("1", this.onePanel);
        this.add("2", this.twoPanel);
        this.add("3", this.threePanel);

    }
}
